Why not just let the program run until it ends?
The program will never end.
Look again at the program:
' Example of a loop DO PRINT "Type a number" INPUT NUMBER PRINT "6% of the number is", NUMBER * 0.06 LOOP END
The DO
and the LOOP
are matched like brackets ( ) or [ ].
The statements inside of them will be
done over and over,
starting with the first enclosed statement and going on in sequence.
You can have as many statements as you need between DO
and LOOP
:
DO ' start of loop ' first statement to be repeated ' second statement to be repeated ' third statement to be repeated ' ' ' last statement to be repeated LOOP ' end of loop END
Do you see anything in the DO
or the LOOP
statement that says how many times the
statements between them are to be repeated?